/*
 * Created: 2022-08-27 15:57:30
 * Author : 涛涛涛
 */

import React, { FC, useContext } from 'react';
import { View, Text } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
import { ProductExhibitionContext } from '@/pages/ProductExhibition/ProductExhibitionContext';
import Wireframe from '@/pages/ProductExhibition/components/Wireframe/Wireframe';
import HeadTitle from '@/pages/ProductExhibition/components/HeadTitle/HeadTitle';
export interface IProps extends ICompProps {}
Introduction.defaultProps = {} as Partial<IProps>;
function Introduction(props: IProps) {
    const { className, style } = props;
    const localClassName = useClassName('Introduction', className);
    const { product } = useContext(ProductExhibitionContext);
    return (
        <RootView className={localClassName} style={style}>
            <Wireframe
                head={<HeadTitle title="作品介绍" iconUrl={require('@/assets/images/zuo_pin_jie_shao.png')} />}
                body={<View className="Introduction-detail">{product.artwork.intro}</View>}
            />
        </RootView>
    );
}
export default React.memo(Introduction as FC<IProps>);
const RootView = styled(View)`
    &.Introduction {
        margin-top: 50px;
        .Introduction-detail {
            padding: 50px 30px;
            font-size: 28px;
            word-break: break-all;
            line-height: 36px;
        }
    }
`;
